package com.wxblockchain.core.network.task;

import com.wxblockchain.core.network.reqConfig.DataConfig;
import com.wxblockchain.core.network.reqConfig.ServiceCallback;
import com.wxblockchain.core.network.reqConfig.ServiceParams;

/**
 * Created by louyaming on 2020/04/21.
 */

public class ServiceTask extends BaseTask {
    public ServiceParams serviceParams;
    public DataConfig dataConfig;
    private ServiceCallback callback;


    public ServiceTask(ServiceParams serviceParams) {
        this.serviceParams = serviceParams;
        tagConfig.primaryTag = serviceParams.getServiceTag();
        dataConfig = new DataConfig();
    }

    public ServiceTask setUseVirtualData(boolean useVirtualData) {
        dataConfig.useVirtualData = useVirtualData;
        return this;
    }

    public TagConfig getTagConfig() {
        return tagConfig;
    }

    public void setTagConfig(TagConfig tagConfig) {
        this.tagConfig = tagConfig;
    }

    public ServiceParams getServiceParams() {
        return serviceParams;
    }

    public ServiceCallback getCallback() {
        return callback;
    }

    public ServiceTask setCallback(ServiceCallback callback) {
        this.callback = callback;
        return this;
    }
}
